import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class C_2016_lanqiao_2271 {
    public static void main(String[] args) {
        int num,temp,first;
        int flag;
        Scanner sc = new Scanner(System.in);
        num = sc.nextInt();
        int[] a = new int[num];
        int[] b = new int[num];
        for (int i = 0; i < num; i++) {
            a[i] = sc.nextInt();
        }
        b[0] = -a[0];
        for (int i = 1; i < num; i++) {
            Set<Integer> set = new HashSet<>();
            first = 0;
            flag = 0;
            temp = a[i];
            for (int j = 0; j < i; j++) {
                if (temp == a[j])
                    flag++;
            }
            if (flag == 0)
                b[i] = -a[i];
            else {
                for (int j = i-1; j >= 0; j--) {
                    if (a[j]==temp){
                        first = j;
                        break;
                    }
                }
                for (int j = first; j < i; j++) {
                    set.add(a[j]);
                }
                b[i] = set.size()-1;
            }
        }
        for(int e:b){
            System.out.print(e);
            System.out.print(' ');
        }
    }
}
